"""
认证与授权模块
"""
from .models import Token
from .grant_handlers.base_user_authenticator import BaseUserAuthenticator
from .services.token_service import TokenService
from .services.oauth_service import OAuthService, InvalidClientError
from .services.enhancer import TokenEnhancer
from .services.client_verifier import BaseClientVerifier
from .controllers.token_controller import TokenController
from .middleware import OAuthMiddleware
from .security import get_current_principal
from .permission import pre_authorize

__all__ = [
    # Models
    "Token",

    # Services & Exceptions
    "BaseUserAuthenticator",
    "TokenService",
    "OAuthService",
    "InvalidClientError",
    "TokenEnhancer",
    "BaseClientVerifier",

    # Security Context & Permission
    "get_current_principal",
    "pre_authorize",

    # Controllers
    "TokenController",
    
    # Middleware
    "OAuthMiddleware",
] 